package com.jxd.service;

import com.jxd.mapper.EventRecordMapper;
import com.jxd.model.EventRecord;
import org.springframework.stereotype.Service;

import java.util.List;

import javax.annotation.Resource;

/**
 * @Created with IDEA
 * @author:zhaoyuZhang
 * @Date:2020/7/22 10:05
 * @program: bigdata
 * EventRecordService
 */
@Service
public class EventRecordService {
    @Resource
    EventRecordMapper eventRecordMapper;

    /**
     * 根据主键查询
     * @param id
     * @return
     */
    public EventRecord selectByPrimaryKey (String id){
        return eventRecordMapper.selectByPrimaryKey(id);
    }

    public void insertList(List<EventRecord> eventRecords) {
    	int a = eventRecordMapper.insertList(eventRecords);
    }
    
    public void updateXlTime(EventRecord eventRecord) {
    	int b = eventRecordMapper.updateXlTime(eventRecord);
    }
    
    public List<EventRecord> selectByUnitIdAndFileName(String UnitId,String fileName){
    	List<EventRecord> eventRecords = eventRecordMapper.selectByUnitIdAndFileName(UnitId, fileName);
    	return eventRecords;
    }
}
